<%@codepage="65001"%>
<%session.codepage="65001"%>
<!-- #include virtual=/inc/dbConn.asp -->
<!-- #include virtual=/inc/function.asp -->
<!-- #include virtual=/inc/action.header.inc.asp -->

<%
	'## 파라미터 변수 선언부
	workSeq	= Request("workSeq")

	SQLTitle = "-- ■■■■ 의견 List up ■■■■"	
	
	userId		= Request.Cookies("S_uid")
	
	'## 검색조건에 따른 조건절 만들기 

	SQL = "SELECT A.tailSeq, B.userNm tailer, A.comment, CASE WHEN A.modDt IS NULL THEN  CONVERT(varchar(16), A.writeDt, 121) ELSE  CONVERT(varchar(16), A.modDt, 121) END wDt " & _
			"		FROM tblWorkBbsTail A " & _
			"				LEFT JOIN tblUser B ON A.tailerID=B.userId WHERE A.flag='Y' AND workSeq=" & workSeq & _
			"	ORDER BY wDt DESC "
			
	If xMode="debug" Then 
		Call showDebug(SQLTitle,SQL) 
	End If 

	Set Rs=Server.CreateObject("ADODB.RecordSet")
	Rs.open SQL, DbCon, 1
	
	Response.write "<TailList>" & vbcrlf

	If Rs.eof Or Rs.bof Then 
	Else 
		Do Until Rs.eof Or Rs.bof
			
			Response.write "	<Tails>" & vbcrlf
				Call mkXMLNode("tailSeq", rs("tailSeq"), 2)
				Call mkXMLNode("tailer", rs("tailer"), 2)
				Call mkXMLNode("comment", rs("comment"), 2)
				Call mkXMLNode("wDt", RIGHT(rs("wDt"),11), 2)
			Response.write "	</Tails>" & vbcrlf

		Rs.movenext
		Loop 
	End If
	Response.write "</TailList>" & vbcrlf
'	Call rsWithXML("Save OK!")
%>